//every
var arr=[
    {name:'zs',age:20},
     {name:'ww',age:15},
     {name:'ls',age:22},
 ];
 //该群体的所有人都成年了嘛？
 var res1=arr.every(function(value,index,arr){
       return value.age>18;
 });
 console.log(res1);
 //some
 //该群体有未成年人么？
 var res2=arr.some(function(object){
       return object.age<18;
 });
 console.log(res2);
 
 //filter 过滤   返回新数组 新数组包含满足要求的数据项
 var res3=arr.filter(function(object){
     return object.age<18;
 });
 console.log(res3); //[ { name: 'ww', age: 15 } ]
 //map 一一映射  给所有人添加学校 返回新数组：处理后的数据项 原数组不受影响
var res4=arr.map(function(object){
    object.school='tyut'
    return object;
});[
{ name: 'zs', age: 20, school: 'tyut' },
{ name: 'ww', age: 15, school: 'tyut' },
{ name: 'ls', age: 22, school: 'tyut' }
]
console.log(res4);

//数组的循环遍历 forEach
res4.forEach(function(value,index){

});